Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support tasks without commands #27191

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

marvinhagemeister
Copy link
Contributor

@marvinhagemeister marvinhagemeister commented Dec 2, 2024

Support running tasks that have no command and only dependencies. This is useful for when you want to group tasks only.

Fixes #27165

@marvinhagemeister marvinhagemeister marked this pull request as ready for review December 2, 2024 16:22
Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking as "Request changes" so we don't land it by accident before v2.2 merge window.

@bartlomieju bartlomieju added this to the 2.2.0 milestone Dec 2, 2024
@@ -446,7 +446,6 @@
},
"command": {
"type": "string",
"required": true,
"description": "The task to execute"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the description to mention that this field is required unless there's "dependencies" field specified?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it required though? Having a task like this is valid in the string form:

{
  "tasks": {
    "foo": ""
  }
}

And I guess the same is also fine for the object notation:

{
  "tasks": {
    "foo":  {}
  }
}

That's just a task that does nothing.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Kind of feels like we could just merge this as a fix.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine merging it as a fix. Please update docs before merging it though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deno task: support empty command if dependencies are specified
3 participants